local Lua__baishuo = fk.CreateSkill {

  name = "Lua__baishuo",

}

Fk:loadTranslationTable{
    
    ["Lua__baishuo"] = "白说",
    [":Lua__baishuo"] = "当你指定/成为其他角色基本牌目标后，你可以弃置目标/使用者一张牌。",
}

Lua__baishuo:addEffect(fk.TargetSpecified, {
    anim_type = "control",
    can_trigger = function(self, event, target, player, data)
        if not player:hasSkill(Lua__baishuo.name) then return false end
        return data.from == player and data.to ~= player and data.card.type == Card.TypeBasic and not data.to:isNude()
    end,
    on_cost = function(self, event, target, player, data)
        return player.room:askToSkillInvoke(player, {skill_name = Lua__baishuo.name,})
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        local other
        other = data.to
        if not other:isNude() then

            local card = room:askToChooseCard(player, {
                target = other,
                flag = "he",
                skill_name = Lua__baishuo.name,
            })

            if card then
                room:throwCard({card}, Lua__baishuo.name, other, player)
            end
        end
    end,
})
Lua__baishuo:addEffect(fk.TargetConfirmed, {
    anim_type = "control",
    can_trigger = function(self, event, target, player, data)
        if not player:hasSkill(Lua__baishuo.name) then return false end
        return data.from ~= player and data.to == player and data.card.type == Card.TypeBasic and not data.from:isNude()
    end,
    on_cost = function(self, event, target, player, data)
        return player.room:askToSkillInvoke(player, {skill_name = Lua__baishuo.name,})
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        local other
        other = data.from
        if not other:isNude() then
            local card = room:askToChooseCard(player, {
                target = other,
                flag = "he",
                skill_name = Lua__baishuo.name,
            })
            if card then
                room:throwCard({card}, Lua__baishuo.name, other, player)
            end
        end
    end,
})

return Lua__baishuo